﻿using SBlogCore.Common.DatabaseAccessor;
using SBlogCore.Entitys.SysUserManager;

namespace SBlogCore.Entitys.SysRoleManager
{
    public class SysUserRole:IBaseEntity, IEntityTypeConfiguration<SysUserRole>
    {
        /// <summary>
        /// 系统用户Id
        /// </summary>
        [Comment("系统用户Id")]
        public long SysUserId { get; set; }

        /// <summary>
        /// 系统用户
        /// </summary>
        [Comment("系统用户")]
        public SysUserInfo? SysUser { get; set; }

        /// <summary>
        /// 系统角色Id
        /// </summary>
        [Comment("系统角色Id")]
        public long SysRoleId { get; set; }

        /// <summary>
        /// 系统角色
        /// </summary>
        [Comment("系统角色")]
        public SysRoleInfo? SysRole { get; set; }

        public void Configure(EntityTypeBuilder<SysUserRole> builder)
        {
            builder.HasData(new SysUserRole()
            {
                SysUserId= 142307070910551,
                SysRoleId = 367366781984837
            });
        }
    }
}
